package com.biz.primus.ms.oms.service.logs;

import com.biz.primus.model.oms.vo.OmsOrderReturnVo;
import com.biz.primus.model.oms.vo.OmsOrderVo;
import com.biz.primus.model.oms.vo.returns.RefundRequestVo;
import lombok.Builder;
import lombok.Data;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * 订单日志服务
 * @author yanweijin
 * @date 2017/10/18
 */
public interface OrderLogsService {


	/**
	 * 记录订单收集日志
	 *
	 * @param vo 收单数据
	 * @param msg 日志信息
	 */
	@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
	void logOrderCollection(OmsOrderVo vo, String msg);



	/**
	 * 记录退单收集日志
	 *
	 * @param vo 收单数据
	 * @param msg 日志信息
	 */
	@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
	void logOrderReturnCollection(OmsOrderReturnVo vo, String msg);


	/**
	 * 记录退款单收集日志
	 *
	 * @param vo 收单数据
	 * @param msg 日志信息
	 */
	@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
	void logOrderRefundCollection(RefundRequestVo vo, String msg);


	/**
	 * 分单日志
	 * @param orderCode 订单编号
	 * @param sourceDepotCode 订单原本的门店
	 * @param targetDepotCode 分配到的门店
	 * @param msg 分单备注/分单消息
	 * @param operator 操作者
	 */
	@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
	void logOrderAllocation(String orderCode, String sourceDepotCode, String targetDepotCode, String msg, String operator);




}
